package com.leetcode.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.HashMap;

@Component
public class TestConfig {

    @Value("${test.path}")
    private String path;

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Bean
    public Config GetPath() {
        Config config = new Config();
        HashMap<Integer, String> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put(1, path);
        config.setState(objectObjectHashMap);
        return config;
    }

}
